stage 3 proposal support for Acorn
This is a plugin for Acorn - a tiny, fast JavaScript parser, written completely in JavaScript.
It implements support for all current ECMAScript stage 3 proposals. Neither loose mode nor walk are currently supported.
Usage
You can use this module directly in order to get an Acorn instance with the plugin installed:
var acorn = require('acorn-stage3');
Or you can use inject.js
for injecting the plugin into your own version of Acorn like this:
var acorn = require('acorn-stage3/inject')(require('./custom-acorn'));
Then, use the plugins
option to enable the plugiin:
var ast = acorn.parse(code, {
plugins: { stage3: true }
});
License
This plugin is released under the GNU Affero General Public License.
Please feel free to open an issue if this choice of license is a problem for your use-case.